<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		function moveon(){
			var answer=confirm("准备好了吗？");
			if(answer) window.location="http://www.baidu.com";
		}
		setTimeout(moveon,2000);
	</script>
</body>
</html>